package MD2Model;
/**
 * This define a triangle
 * There are 2 float array: One for Vertex indices which called vertex
 * 							The other for texture coordinate indices, called tcIndex
 */
public class Triagle {
	private short vertex[]; 	/* vertex indices of the triangle */
	private short tcIndex[]; 	/* texcoord indices */

	
	public Triagle() {
		vertex = new short[3];
		tcIndex = new short[3];
	}
	
	public void SetValue (short vertex1, short vertex2, short vertex3, short texCoordIndex1, short texCoordIndex2, short texCoordIndex3){
		vertex[0] = vertex1;
		vertex[1] = vertex2;
		vertex[2] = vertex3;
		tcIndex[0] = texCoordIndex1;
		tcIndex[1] = texCoordIndex2;
		tcIndex[2] = texCoordIndex3;
	}
	
	/**
	 * Get the vertex specified
	 * @param index which vertices do you want to get?
	 * @return the vertex at the index location
	 */
	public short GetVertex (int index){
		return vertex[index];
	}
	
	/**
	 * Get the  texture index specified
	 * @param index which texture do you want to get?
	 * @return the texture coordinate at the index location
	 */
	public short GetTexCoordIndex (int index){
		return tcIndex[index];
	}
}
